import React from 'react'
import { hocTable } from '@/hoc'

const columns = [
    {
        title: 'ID',
        dataIndex: 'vid',
        key: 'vid'
    },
    {
        title: '游客ID',
        dataIndex: 'visitor_id',
        key: 'visitor_id',
    },
    {
        title: '游客名称',
        dataIndex: 'visitor_name',
        key: 'visitor_name',
    },
    {
        title: '游客头像',
        dataIndex: 'visitor_avatar',
        key: 'visitor_avatar',
        render: (img: string) => {
            return <img style={{
                width: 50,
                height: 50
            }} src={'http://fangadmin.shbwyz.com' + img} alt="" />
        }
    },
    {
        title: '在线状态',
        dataIndex: 'online_status',
        key: 'online_status',
        render: (status: number) => {
            return <>
                <span>
                    { status === 1? '在线': '离线' }
                </span>
            </>
        }
    },
    {
        title: 'IP',
        dataIndex: 'visitor_ip',
        key: 'visitor_ip',
    },
    {
        title: '创建时间',
        dataIndex: 'create_time',
        key: 'create_time',
    },
];


const visitor = () => {
    return (
        <div>

        </div>
    )
}

export default hocTable(visitor, false, "/getVisitor", columns)
